package ooday05_1;

public class EnumTest {
    public static void main(String[] args) {
            Seasons s = Seasons.SPRING;
            //输出枚举的对象名称和描述
            System.out.println(s.getSeasonName()+","+s.getSeasonDesc());

            //输出枚举类中的所有对象
            Seasons[] seasons = Seasons.values();
            for(int i=0;i<seasons.length;i++){
                //输出枚举属性
                System.out.println(seasons[i]);
                //输出枚举对象名称和描述
                System.out.println(seasons[i].getSeasonName()+","+seasons[i].getSeasonDesc());
            }
    }
}
